<template>
  <view>
    <u-navbar
      :title="title"
      :background="{ backgroundColor: '#fff' }"
      backIconColor="#333"
      title-color="#333"
      :border-bottom="false"
      :is-back="true"
    >
    </u-navbar>
    <view class="contentView">
      <u-parse :html="content" :tag-style="tagStyle"></u-parse>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      tagStyle: {
        table: 'border-collapse: collapse;',
        td: 'border: 1px solid #ccc;line-height: 1.5;min-width: 50px;padding: 3px 5px;text-align: left;'
      },
      title: '',
      content: ''
    }
  },
  onLoad(options) {
    const that = this
    that.$u
      .get('/app-api/cms/agreement/get-by-identify?identify=' + (options.key || ''))
      .then((res) => {
        that.title = res.data.title
        that.content = res.data.content
      })
  },
  methods: {}
}
</script>

<style scoped>
.contentView {
  padding: 30rpx;
}
</style>
